<?php ob_start();
session_start(); //on relaye la session
if(isset($_SESSION["is_registered"]) && $_SESSION["is_registered"] == "registered"){
	$enregistrer = $_SESSION["is_registered"];
	$message="";
}else{
	header("Location:../../menu.php?erreur=intru"); // redirection en cas d'echec
}
// script PHP interrogation Base de donnees pour reponse a la requette AJAX
require_once('../../Connections/microassur.php');
include ("config.php");

// Connexion a la base de donnees  
	  mysql_select_db($database_microassur, $microassur);

	$QuestionBase = "SELECT * from conditionvente  WHERE Identifiant_offre='".$_GET['id2']."'  or Identifiant_produit='".$_GET['id1']."' ORDER BY Identifiant_condition_vente ASC " ;
	$result_recherche=mysql_query($QuestionBase, $microassur) or die (mysql_error());
	$nb=mysql_num_rows(result_recherche);
// construction de la liste deroulante
$aff="";
while ($row=mysql_fetch_assoc($result_recherche))
			$aff.="<label><input type='checkbox'  value='".$row['Identifiant_condition_vente']."'/>".$row['Libelle_condition_vente']."</label><br>"; 
		
// envoi reponse Php a Ajax	
	echo $aff;

ob_end_flush();
?>